
		<div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
			
			<h1 id="sidebar-title"><a href="#">Simpla Admin</a></h1>
		  
			<!-- Logo (221px wide) -->
			
		  <div align="center">
		  	<a href="#"><img id="logo"  src="${pageContext.request.contextPath}/recursos/imagenes/AMP_Salvador.png" alt="Simpla Admin logo"></a>
		  
		  </div>
			<!-- Sidebar Profile links -->
			<div id="profile-links" align="center">
							<a href="#" title="View the Site">Inicio</a> |<form action="cerrarSesion.action" name="cerrar"> <a href="#" onclick="document.forms['cerrar'].submit()" title="Sign Out">Cerrar Sesion</a></form>
			</div>        
			<div id="pegarMenu">
			</div>
			
			
			<div id="messages" style="display: none"> <!-- Messages are shown when a link with these attributes are clicked: href="#messages" rel="modal"  -->
				
				<h3>3 Messages</h3>
			 
				<p>
					<strong>17th May 2009</strong> by Admin<br>
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>2nd May 2009</strong> by Jane Doe<br>
					Ut a est eget ligula molestie gravida. Curabitur massa. Donec 
eleifend, libero at sagittis mollis, tellus est malesuada tellus, at 
luctus turpis elit sit amet quam. Vivamus pretium ornare est.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>25th April 2009</strong> by Admin<br>
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
				
				<form action="" method="post">
					
					<h4>New Message</h4>
					
					<fieldset>
						<textarea class="textarea" name="textfield" cols="79" rows="5"></textarea>
					</fieldset>
					
					<fieldset>
					
						<select name="dropdown" class="small-input">
							<option selected="selected" value="option1">Send to...</option>
							<option value="option2">Everyone</option>
							<option value="option3">Admin</option>
							<option value="option4">Jane Doe</option>
						</select>
						
						<input class="button" value="Send" type="submit">
						
					</fieldset>
					
				</form>
				
			</div> <!-- End #messages -->
			
		</div>
		
		  <script type="text/javascript">
    
    
    	$(document).ready(function(){
    		crearMenu();

    		

		});        

		function cerrarSesion(){
			 $.ajax({
 		        url:"${pageContext.request.contextPath}/cerrarSesion.action",
 		        //dataType: "html" ,
 		        success:function(responsetext) {
					  
 		        }
 		    });
		}
    	
    	function crearMenu(){
    		 $.ajax({
    		        url:"${pageContext.request.contextPath}/menu.action",
    		        dataType: "html" ,
    		        success:function(responsetext) {
						//console.log("queee pasaaa");
    		        	//alert("1");	
    		        	//var html = eval(responseText);
    		        	$("#pegarMenu").append(responsetext);
    		        	menuArmado();
    		                    
    		        }
    		    });
    	}
    	
    	function menuArmado(){
//Sidebar Accordion Menu:
			
			$("#main-nav li ul").hide(); // Hide all sub menus
			$("#main-nav li a.current").parent().find("ul").slideToggle("slow"); // Slide down the current menu item's sub menu
			
			$("#main-nav li a.nav-top-item").click( // When a top menu item is clicked...
				function () {
					$(this).parent().siblings().find("ul").slideUp("normal"); // Slide up all sub menus except the one clicked
					$(this).next().slideToggle("normal"); // Slide down the clicked sub menu
					return false;
				}
			);
			
			$("#main-nav li a.no-submenu").click( // When a menu item with no sub menu is clicked...
				function () {
					window.location.href=(this.href); // Just open the link instead of a sub menu
					return false;
				}
			); 

	    // Sidebar Accordion Menu Hover Effect:
			
			$("#main-nav li .nav-top-item").hover(
				function () {
					$(this).stop().animate({ paddingRight: "25px" }, 200);
				}, 
				function () {
					$(this).stop().animate({ paddingRight: "15px" });
				}
			);
    	}
    	
    	function cargarPagina(numero,url){
    		$("#real-body").load('${pageContext.request.contextPath}/paginas/'+url);
    	}
	</script>